package com.github.core.parse.sse;

import cn.hutool.core.util.IdUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.List;

@Data
@NoArgsConstructor
public class ChatResponse {

    private String id;
    private String model;
    private List<Choice> choices;

    // Getters and Setters



    public ChatResponse(String model, String id, List<Choice> choices) {
        this.model = model;
        this.id = id;
        this.choices = choices;
    }
    public static ChatResponse build(String message) {
        return new ChatResponse(
                "llm", IdUtil.fastSimpleUUID(), Arrays.asList(
                new Choice(new Content().setContent(message)
                )
        )
        );
    }

    public static ChatResponse build2(String message) {
        return new ChatResponse(IdUtil.fastSimpleUUID(),
                "llm", Arrays.asList(
                new Choice(new Content().setContent(message),"stop")
        )
        );
    }
}
